home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1481.dms / var1481.adf / Scripts / bishop.mco < prev    next >
Text File  |  1994-07-07  |  3KB  |  125 lines

  1. ; This file Copyright 1994 Dan Wesnor
  2. ;
  3. ; This file may be freely distributed as long as no
  4. ; information is changed, no charge is made for
  5. ; the file, and the archive in which the file was
  6. ; contained is distributed in tact.  Any violation
  7. ; of these conditions requires written authorization
  8. ; by the copyright holder.
  9.  
  10. /*
  11.     This is a script for the Magic Camera rendering system.
  12.     Magic Camera (MC) uses ray-tracing for realisting rendering
  13.     of shadows, reflections, and transparency.  It is in the
  14.     final phase of completion and should be released shortly.
  15.     Plans are for release as shareware with a nominal charge
  16.     for a full working version.
  17.  
  18.     See comments for a description of features.
  19.     Comments are either C-style (like this one), or a semi-colon
  20.     followed by text    ; like this.
  21. */
  22.  
  23. /*
  24.     Primitive object include triangles and parallelograms,
  25.     both of which may be phong smoothed, spheres, rings (or disks),
  26.     and planes.
  27.  
  28.     Compound objects, which allow complex shapes to be built,
  29.     include extrusions, spins, skin-over-frame, filled complex
  30.     2-d polygons (with holes), heightfields, boxes, and
  31.     polygon spheres.
  32.  
  33.     Available patterns are check, wood, marble, brick,
  34.     several types of bitmap wraps, blotch, and clouds.
  35.  
  36.     Textures include waves and several type of bumpmaps.
  37.  
  38.     Lamps include point-source, directional, directional
  39.     spotlights (w/ beam width and beam falloff sharpness
  40.     controls), or spherical extended.
  41.  
  42.     Variables, which may be used in complex expressions, include
  43.     real numbers, integers, 3d-vectors, and arrays of reals, 2-d vectors,
  44.     and 3-d vectors.  Variables and arrays may be used to facilitate
  45.     animation.
  46. */
  47.  
  48. /* exports bishop.obj, which is 16.5 units high by 4 units radius */
  49.  
  50. color __bishopsurf { diff <1, 1, 1> }
  51.  
  52. object bishop.obj    /* a chess piece */
  53.  
  54. /* 
  55.     a slice is a two-dimensional array which is used
  56.     to describe 2D lines or polygons.  a slice can then
  57.     be manipulated in variaous ways to form complex
  58.     polygon mesh objects.  it may be spun, extruded, or
  59.     several slices may be used as a framework on which a
  60.     skin is applied.
  61. */
  62.  
  63. slice __bishop.slice = {
  64.     <0, 0>,
  65.     <4, 0>,
  66.     <3.3, .7>,
  67.     <2.5, 1>,
  68.     <2, 1.5>,
  69.     <2.5, 2>,
  70.     <3, 2>,
  71.     <3.5, 2.5>,
  72.     <3, 3>,
  73.     <1.5, 3.5>,
  74.     <1, 5>,
  75.     <1, 7>,
  76.     <1.5, 8>,
  77.     <2.5, 8>,
  78.     <3, 8.5>,
  79.     <2.5, 9>,
  80.     <1.5, 9>,
  81.     <2, 9.5>,
  82.     <1.5, 10>,
  83.     <.3, 10>,
  84.     <1, 11>,
  85.     <1.5, 12.5>,
  86.     <1, 14>,
  87.     <0, 15.5>,
  88.     <.5, 16>,
  89.     <0, 16.5>
  90. }
  91.  
  92. /*
  93.     spins need not go through all 360 degrees.
  94.     both start and end angles may be specified.
  95.     a 'rise' may also be set, so that the slice is
  96.     moved upwards as it is spun, creating a spiral
  97.     effect.  spins may be greate than 360 degrees.
  98.  
  99.     as of now, all spins are around the Y axis.
  100. */
  101.  
  102. spin {
  103.     loc    <0, 0, 0>    ; location to spin around 
  104.     segs    8        ; segments of the spin, i.e.,
  105.                 ; how many divisions in the spun
  106.                 ; object.  this indicates that
  107.                 ; a division will occur every
  108.                 ; 45 degrees (360/8=45)
  109.     patt    __bishopsurf    ; apply the surface
  110.     slice    __bishop.slice    ; define the slice to spin
  111.     smooth            ; apply smoothing routines
  112. }
  113.  
  114. endobject    /* bishop.obj */
  115.  
  116. lockobj bishop.obj    ; lock the object into pattern space
  117.             ; so that it does not 'slide off' the 
  118.             ; object as it is moved
  119.  
  120. /* these variable tell the world outside this file how big
  121.    the object is.
  122. */
  123. real bishop_radius = 4
  124. real bishop_height = 16.5
  125.